<%@page import="oa.service.impl.DepartmentServiceImpl" %>
<%@page import="oa.service.impl.CompanyServiceImpl" %>
<%@page import="oa.service.CompanyService" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@  taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html;charset=utf-8");
    CompanyService company = new CompanyServiceImpl();
    int companyid = (int) session.getAttribute("companyid");
    if (companyid == 0) {
        session.setAttribute("selectcompany", company.selectAllCompany(0));
    } else {
        session.setAttribute("selectcompany", company.selectAllCompany(companyid));
    }

%>
<div class="form-group row">
    <label class="col-lg-2 col-form-label" for="val-number">公司 <span class="text-danger">*</span></label>
    <div class="col-lg-10">
        <select class="form-control" id="val-company" name="val-company">
            <c:forEach var="companyitem" items="${selectcompany}">

                <option value="${companyitem.companyId}" id="select">${companyitem.companyName}</option>

            </c:forEach>
        </select>

    </div>
</div>